package day04;

import java.util.Scanner;

public class Exercise_day04Demo {
    public static void main(String[] args) {

       for (int times=0;times<5;times++){
           System.out.println("行动是成功的阶梯!");
       }
       for (int num = 1;num <= 9;num++){
           System.out.println(num + "*9=" + num * 9);
       }
       for (int num =1;num<=9;num +=2){
           System.out.println(num + "*9=" + num * 9);
       }
       for (int num=9;num>=1;num--){
           System.out.println(num + "*9=" + num * 9);
       }



        /*
        Scanner scan = new Scanner(System.in);
        int num = (int)(Math.random()*1000+1);
        System.out.println(num);
        System.out.println("猜吧!");
        int guess;
        do {
            System.out.println("猜吧!");
            guess = scan.nextInt();
            if (guess>num){
                System.out.println("猜大了!");
            }else if (guess<num){
                System.out.println("猜小了!");
            }else {
                System.out.println("恭喜你猜对了!");
            }
        }while (guess!=num);

         */

        /*
        Scanner scan = new Scanner(System.in);
        int num = (int)(Math.random()*1000+1);
        System.out.println(num);
        System.out.println("猜吧!");
        int guess = scan.nextInt();
        while (guess!=num){
            if (guess>num){
                System.out.println("猜大了!");
            }else {
                System.out.println("猜小了!");
            }
            System.out.println("猜吧!");
            guess = scan.nextInt();
        }
        System.out.println("恭喜你猜对了!");

         */

        /*
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择功能:1.存款 2.取款 3.查询 4.退卡");
        int command = scan.nextInt();
        switch (command){
            case 1:
                System.out.println("存款业务...");
                break;
            case 2:
                System.out.println("取款业务...");
                break;
            case 3:
                System.out.println("查询业务...");
                break;
            case 4:
                System.out.println("退卡业务...");
                break;
            default:
                System.out.println("输入错误...");
        }

         */

        /*
       for (int times=0;times<5;times++){
           System.out.println("行动是成功的阶梯!");
       }
       for (int num = 1;num <= 9;num++){
           System.out.println(num + "*9=" + num * 9);
       }
       for (int num =1;num<=9;num +=2){
           System.out.println(num + "*9=" + num * 9);
       }
       for (int num=9;num>=1;num--){
           System.out.println(num + "*9=" + num * 9);
       }

         */

        /*
        Scanner scan = new Scanner(System.in);
        int num = (int)(Math.random()*1000+1);
        System.out.println(num);
        System.out.println("猜吧!");
        int guess;
        do {
            System.out.println("猜吧!");
            guess = scan.nextInt();
            if (guess>num){
                System.out.println("猜大了!");
            }else if (guess<num){
                System.out.println("猜小了!");
            }else {
                System.out.println("恭喜你猜对了!");
            }
        }while (guess!=num);

         */

        /*
        Scanner scan = new Scanner(System.in);
        int num = (int)(Math.random()*1000+1);
        System.out.println(num);
        System.out.println("猜吧!");
        int guess = scan.nextInt();
        while (guess!=num){
            if (guess>num){
                System.out.println("猜大了!");
            }else {
                System.out.println("猜小了!");
            }
            System.out.println("猜吧!");
            guess = scan.nextInt();
        }
        System.out.println("恭喜你猜对了!");

         */

        /*
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择功能:1.存款 2.取款 3.查询 4.退卡");
        int command = scan.nextInt();
        switch (command){
            case 1:
                System.out.println("存款业务...");
                break;
            case 2:
                System.out.println("取款业务...");
                break;
            case 3:
                System.out.println("查询业务...");
                break;
            case 4:
                System.out.println("退卡业务...");
                break;
            default:
                System.out.println("输入错误...");
        }

         */

    }
}
